<style>
	table.ui-table-panelLayout tr td {
		padding-top: 1px !important;
		padding-bottom: 2px !important;
	}
</style>
<input type="hidden" id="mperson" value="<?php echo $this->mperson['cidpers'] ?>" >
<div class="ui-widget ui-widget-content ui-corner-all" style="width: 95%;margin: 3px;">
	<div align="center" class="ui-widget ui-state-default ui-corner-top ui-title">
    	<label>Contribuyente</label>
	</div>
	<div id="panelSesionPersona">
		<table class="ui-table-panelLayout" style="width: 90%; height: 100%; font-size: 90%;">
			<tr>
				<td colspan="2" style="font-weight: bold;font-size: 12px;"><?php echo $this->mperson['crazsoc'] ?></td>
			</tr>
			<tr>
				<td>C&oacute;digo:&nbsp;<b><?php echo $this->mperson['cidpers'] ?></b>
					<input id="mhresum" name="mhresum" type="hidden" value="<?php echo $this->mperson['mhresum'] ?>" />
					<input id="vnrodoc" name="vnrodoc" type="hidden" value="<?php echo $this->mperson['vnrodoc'] ?>" />
				</td>
				<td rowspan="7" align="center" valign="top">
					<img style="width: 85px; height: 105px; border: 1px solid #000;" src="<?php echo $this->util()->getPhoto($this->mperson['cidpers']); ?>" />
				</td>
			</tr>
			<tr>
				<td>Declaraci&oacute;n Jurada:&nbsp;
					<table>
						<tr>
							<td><b><?php echo $this->mperson['vnrodoc'] ?></b></td>
							<td><button title="Ver declaraci&oacute;n" style="line-height: 25px;height: 25px;" id="btnVerDeclaracion"></button></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>Presentada el:&nbsp;<b><?php echo $this->mperson['dfecdoc'] ?></b></td>
			</tr>
			<tr>
				<td>Motivo:&nbsp;<b><?php echo $this->mperson['vmotivo'] ?></b></td>
			</tr>
			<tr>
				<td>Predios registrados:&nbsp;<b><?php echo $this->mperson['ntotpre'] ?></b></td>
			</tr>
			<tr>
				<td>Comercios registrados:&nbsp;<b><?php echo $this->mperson['ntotcom'] ?></b></td>
			</tr>
			<tr>
				<td>Base Imponible:&nbsp;<b><?php echo $this->mperson['nbaseim'] ?></b></td>
			</tr>
			<tr>
				<td colspan="2">Impuesto Predial:&nbsp;<b><?php echo $this->mperson['nimpanu'] ?></b></td>
			</tr>
			<tr>
				<td colspan="2">En proceso de fiscalidaci&oacute;n:&nbsp;<b><?php echo $this->mperson['vprofis'] ?></b></td>
			</tr>
			<tr>
				<td colspan="2">En proceso coactivo:&nbsp;<b><?php echo $this->mperson['vprofis'] ?></b></td>
			</tr>
			<tr>
				<td colspan="2">Convenio de fraccionamiento:&nbsp;<b><?php echo $this->mperson['vprofis'] ?></b></td>
			</tr>
			<tr>
				<td colspan="2">Tramites en proceso:&nbsp;<b><?php echo $this->mperson['vprotra'] ?></b></td>
			</tr>
		</table>
	</div>
</div>
<div class="ui-widget ui-widget-content ui-corner-all" style="width: 95%;margin: 3px;">
	<div align="center" class="ui-widget ui-state-default ui-corner-top ui-title">
    	<label>Morosidad</label>
	</div>
	<div>
		<table class="ui-table-panelLayout" style="width: 90%; font-size: 90%;">
			<tr>
				<td rowspan="7" align="center" valign="top">
					<img style="" src="<?php echo $this->util()->getImage($this->msaldos['vindica']); ?>">
				</td>
				<td>Ultimo pago:&nbsp;<b><?php echo $this->mperson['dfecpag'] ?></b></td>
			</tr>
			<tr>
				<td>Emitido:&nbsp;<b>S/. <?php echo $this->msaldos['ntotals']?></b></td>
			</tr>
			<tr>
				<td>Cobrado:&nbsp;<b>S/. <?php echo $this->msaldos['ncancel']?></b></td>
			</tr>
			<tr>
				<td>Saldo:&nbsp;<b>S/. <?php echo $this->msaldos['npendie']?></b></td>
			</tr>
			<tr>
				<td>Saldo con beneficio:&nbsp;<b>S/. <?php echo $this->msaldos['npendie']?></b></td>
			</tr>
			<tr>
				<td>Porcentaje:&nbsp;<b><?php echo $this->msaldos['nporcen']?>%</b></td>
			</tr>
			<tr>
				<td align="center" colspan="2">
					<input type="checkbox" id="chkrptdeudas" /><span style="padding-left:5px;padding-right: 20px;"><b> Deudas </b></span>
					<button id="btnimprrimirestctacte">Estado Cuenta</button>
				</td>
			</tr>
		</table>
	</div>
</div>
<?php echo $this->chkdeudastate ?>
<script type="text/javascript">

 
// andres : modifcado 20/09/2013
// # antes :
// $("#chkrptdeudas").attr('checked',true);
// # ahora
<?php 
	
	if ($this->deudaenabled){
		echo '$("#chkrptdeudas").attr("checked",true);';
	}else{
		echo '$("#chkrptdeudas").attr("disabled", "disabled");';
	}
?> 
// #


$(function(){
	$("#btnVerDeclaracion").button({
	    text: false,
	    icons: {primary:'ui-icon-search'}
	}).bind("click", function(){
	    openDialogData1("registro/listardeclaracion", {cidpers: "<?php echo $this->mperson['cidpers'] ?>"}, "750", "496", "Declaraciones Juradas");
	});

	$("#btnimprrimirestctacte").button({
	    text: true,
	    icons: {primary:'ui-icon-calculator'}
	}).bind("click", function(){    	 			
	var userlogin="<?php echo $this->userlogin ?>";
	var fproyec  ="<?php echo $this->fechahoy ?>";
	if ($("#chkrptdeudas").is(':checked')) {  
		//window.open(pathReport+"reporte=rptEstCta2013v3&opt=CIDPERS^"+$("#mperson").val()+"|VUSERNM^"+usuario,'_blank');
		var vidsigmatrib='0000000273-0000000279-0000000283-0000007267-0000008509-0000000312-0000001260';
		

		// andres : modificado 20/09/2013
		// # antes:
		// var videstado='0-B-D-F-I-J-K-P-N';
		// # ahora
		var videstado = '<?php echo $this->estados ?>';
		// #
		/*window.open(pathReport+"reporte=rptEstCta2013v3&opt=CIDPERS^"+$("#mperson").val()+"|CIDPRED^"+'0000000000' +"|DESDE^"+'1990'+"|HASTA^"+'2014'+"|FPROYE^"+fproyec+"|TRIBUTO^"+vidsigmatrib+"|NESTADO^"+videstado+"|P_USERIMPR^"+userlogin,'_blank');
		*/
		host = 'http://<?php echo $this->util()->getHost(); ?>/git_reporte/';
		vParam = "fechaProyectado="+fproyec+"&usuario="+userlogin+"&contrib="+$("#mperson").val();
		vParam = vParam +"&desde=1990&hasta=2025&tributo="+vidsigmatrib+"&estado="+videstado;
		vParam = vParam +"&predio="+'0000000000'+"&p_userimpr="+userlogin; +"|DESDE^"+'1990'+"|HASTA^"+'2024'+"|FPROYE^"+fproyec+"|TRIBUTO^"+vidsigmatrib+"|NESTADO^"+videstado+"|P_USERIMPR^"+userlogin
		window.open(host+"estadoCuenta.php?"+vParam,'_blank');
		
	}else{
    	openDialogDataFunction1("registro/reporteopcestactacte?ccontri="+ "<?php echo $this->mperson['cidpers'] ?>",{},"1200", "750", "Estado de Cuenta"); 
		
	}   	 
			    	
	});
	
});
	
</script>